package com.example.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * Created by Q-ays.
 * whosqays@gmail.com
 * 07-14-2018 00:56
 */
@Mapper
public interface DemoMapper {

    @Select("SELECT a.*, b.body  \n" +
            "from example as a \n" +
            "inner JOIN demo as b\n")
    List<Map> mixSelect();

    @Select("SELECT * from example where name like '%${s}%'")
    List<Map> selectWithParam(@Param("s") String s);
}
